
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

package com.hlkj.pay.app.merchant.ext;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.hlkj.framework.common.pojo.CommonResult;
import com.hlkj.framework.common.pojo.PageResult;
import com.hlkj.framework.extension.ExtensionPointI;
import com.hlkj.pay.app.merchant.ext.dto.order.ChannelComplaintOrderContext;
import com.hlkj.pay.app.merchant.ext.impl.wxpay.dto.WxComplaintHistoryDto;
import com.hlkj.pay.dto.order.notify.OrderComplaintNotifyDto;
import com.hlkj.pay.infrastructure.model.order.OrderComplaintDO;

/**
 * 商户投诉
 * 
 * @author HlpayTeam
 * @date 2024/09/12 11:39
 */
public interface ChannelMerchantComplaintExtPt extends ExtensionPointI {


    /**
     * 查询分页
     * @param channelPayOrderContext
     */
    CommonResult<List<OrderComplaintDO>> queryComplaintPage(ChannelComplaintOrderContext channelPayOrderContext);

    /**
     * 查询列表
     * @param channelPayOrderContext
     */
    CommonResult<OrderComplaintNotifyDto> queryComplaintDetail(ChannelComplaintOrderContext channelPayOrderContext);
    /**
     * 查询历史
     * @param channelPayOrderContext
     */
    CommonResult<PageResult<WxComplaintHistoryDto>> queryComplaintHistory(ChannelComplaintOrderContext channelPayOrderContext);

    /**
     * 回调解析
     * @param request
     * @param channelComplaintOrderContext
     * @return
     */
    CommonResult<OrderComplaintNotifyDto> complaintStatusParse(HttpServletRequest request, ChannelComplaintOrderContext channelComplaintOrderContext);


    /**
     * 查询投诉地址
     * @param channelPayOrderContext
     * @return
     */
    CommonResult<String> queryComplaintNotify(ChannelComplaintOrderContext channelPayOrderContext);

    /**
     * 创建回调通知
     *
     * @param channelPayOrderContext
     */
    CommonResult<String> saveComplaintNotify(ChannelComplaintOrderContext channelPayOrderContext);

    /**
     * 回复用户
     *
     * @param channelPayOrderContext
     */
    CommonResult<String> replyUser(ChannelComplaintOrderContext channelPayOrderContext);

    /**
     * 反馈处理完成
     *
     * @param channelPayOrderContext
     */
    CommonResult<String> completeComplaint(ChannelComplaintOrderContext channelPayOrderContext);

    /**
     * 更新退款状态
     * @param channelPayOrderContext
     */
    CommonResult<String> updateComplaintProgress(ChannelComplaintOrderContext channelPayOrderContext);

    /**
     *
     * @param commonResult
     * @return
     */
    String callBackResponse(CommonResult commonResult);
}
